<?php
namespace Common\Models;
use Common\BaseModel;
class ViewHomePath extends BaseModel
{
    public $res;
    public $expire;
    public function initialize()
    {
        parent::initialize();
        $this->setSource('view_home_path');
    }


    /**
     * 获取可用的路由
     */
    public function getList($params){
        $conditions = "id>0";
        if(isset($params['keywords']) && !empty($params['keywords'])){
            $conditions .= " AND name like '%{$params['keywords']}%'";
        }
        $getList = $this->find(array(
            $conditions
        ))->toarray();
        return $getList;
    }


}
